custom.js ➔ health   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 3
c 0
b 0
f 0
rs 10
cc 1
1
const httpSuccessCode = 200;
2
3
export function health(req, res) {
4
    res.sendStatus(httpSuccessCode);
5
}
6
7
export function router(routeTable, express, req, res) {
8
    const requestType = req._context.aws;
9
    const service = routeTable[requestType];
10
    const runner = express.makeServiceRunner(service);
11
12
    return runner(req, res);
13
}
14